Paul Eggert [Sun, 19 Aug 2018 06:27:47 +0000 (23:27 -0700)]
Fix bug with ‘mod’ and float+bignum
Problem reported by Andy Moreton in:
https://lists.gnu.org/r/emacs-devel/2018-08/msg00442.html
* src/floatfns.c (fmod_float): Work even if an arg is a bignum.
* test/src/floatfns-tests.el (bignum-mod): New test.
Paul Eggert [Sun, 19 Aug 2018 06:14:13 +0000 (23:14 -0700)]
Update from Gnulib
This incorporates:
2018-08-18 Avoid -Wcast-function-type warnings from casts
* build-aux/config.sub, lib/gettimeofday.c: Copy from Gnulib.
Paul Eggert [Sun, 19 Aug 2018 06:06:41 +0000 (23:06 -0700)]
Tweak integer division
* src/data.c (arith_driver): Reorder to remove unnecessary
FIXNUMP. Tighten test for whether to convert the divisor from
fixnum to mpz_t. Simplify.
Paul Eggert [Sun, 19 Aug 2018 03:47:24 +0000 (20:47 -0700)]
Simplify float_arith_driver
* src/data.c (float_arith_driver): Simplify, as we needn’t
worry about that 30-year-old compiler bug any more.
Paul Eggert [Sun, 19 Aug 2018 03:40:10 +0000 (20:40 -0700)]
Minor fixups for intmax_t→mpz_t conversion
* src/alloc.c (mpz_set_intmax_slow): Tighten assertion.
Work even in the unlikely case where libgmp uses nails.
* src/data.c (FIXNUMS_FIT_IN_LONG): New constant.
(arith_driver): Use it to tighten compile-time checks.
* src/lisp.h (mpz_set_intmax): Do not assume that converting
an out-of-range value to ‘long’ is harmless, as it might raise
a signal. Use simpler expression; compiler can optimize.
Paul Eggert [Sun, 19 Aug 2018 02:40:24 +0000 (19:40 -0700)]
Improve --with-wide-int mpz_t→fixnum conversion
These tuneups and minor simplifications should affect only
platforms with EMACS_INT wider than ‘long’.
* src/alloc.c (make_number): If the number fits in long but
not in fixnum, do not attempt to convert to fixnum again.
Tighten the compile-time check for whether the second attempt
is worth trying, from sizeof (long) < sizeof (EMACS_INT) to
LONG_WIDTH < FIXNUM_BITS. Do not bother computing the sign of
the value to tighten the bounds for whether to try the second
attempt, as it’s not worth the effort. Do not call mpz_size,
which is unnecessary since the number of bits is already known
and the loop can iterate over a shift count instead. Avoid
unnecessary casts. Use + instead of | where either will do,
as + is typically better for optimization.
Improve mpz_t to fixnum when --with-wide-int
* src/alloc.c (make_number): Avoid undefined behavior
when shifting an EMACS_UINT by more than EMACS_UINT_WIDTH bits.
Check for integer overflow when shifting.
Paul Eggert [Sat, 18 Aug 2018 23:13:04 +0000 (16:13 -0700)]
Improve bignum comparison (Bug#32463#50)
* src/data.c (isnan): Remove, as we can assume C99.
(bignumcompare): Remove, folding its functionality
into arithcompare.
(arithcompare): Compare bignums directly here.
Fix bugs when comparing NaNs to bignums.
When comparing a bignum to a fixnum, just look at the
bignum’s sign, as that’s all that is needed.
Decrease scope of locals when this is easy.
* test/src/data-tests.el (data-tests-bignum): Test bignum vs NaN.
Paul Eggert [Sat, 18 Aug 2018 22:39:05 +0000 (15:39 -0700)]
Document that ‘random’ is limited to fixnums
Problem reported by Pip Cet (Bug#32463#20).
* doc/lispref/numbers.texi (Random Numbers):
* src/fns.c (Frandom): Adjust doc.
Paul Eggert [Sat, 18 Aug 2018 22:20:46 +0000 (15:20 -0700)]
Restore traditional lsh behavior on fixnums
* doc/lispref/numbers.texi (Bitwise Operations): Document that
the traditional (lsh A B) behavior is for fixnums, and that it
is an error if A and B are both negative and A is a bignum.
See Bug#32463.
* lisp/subr.el (lsh): New function, moved here from src/data.c.
* src/data.c (ash_lsh_impl): Remove, moving body into Fash
since it’s the only caller now.
(Fash): Check for out-of-range counts. If COUNT is zero,
return first argument instead of going through libgmp. Omit
lsh code since lsh is now done in Lisp. Add code for shifting
fixnums right, to avoid a round trip through libgmp.
(Flsh): Remove; moved to lisp/subr.el.
* test/lisp/international/ccl-tests.el (shift):
Test for traditional lsh behavior, instead of assuming
lsh is like ash when bignums are present.
* test/src/data-tests.el (data-tests-logand)
(data-tests-logior, data-tests-logxor, data-tests-ash-lsh):
New tests.
Eli Zaretskii [Sat, 18 Aug 2018 06:24:38 +0000 (09:24 +0300)]
Avoid compilation warning in w32fns.c
* src/w32fns.c (Fw32_read_registry): Avoid compiler warning
regarding possible use of 'rootkey' without initializing it
first. Reported by Andy Moreton <andrewjmoreton@gmail.com>.
Paul Eggert [Fri, 17 Aug 2018 19:37:57 +0000 (12:37 -0700)]
Improve ‘abs’ performance
* src/floatfns.c (Fabs): Improve performance by not copying
the argument if it would eql the result. As a minor detail,
don't assume fixnums are two’s complement.
Eli Zaretskii [Fri, 17 Aug 2018 14:56:53 +0000 (17:56 +0300)]
Improve documentation of bignums
* etc/NEWS: Enhance the announcement of bignums.
* doc/lispref/numbers.texi (Integer Basics): Add a missing
period. Reported by Basil L. Contovounesios <contovob@tcd.ie>.
Andy Moreton [Tue, 14 Aug 2018 12:59:08 +0000 (13:59 +0100)]
Pacify -Wcast-function-type warnings in GCC 8.1
* src/image.c: Move attributes into DEF_DLL_FN call.
* src/dynlib.c (dynlib_addr): Use get_proc_addr.
* src/w32.h: (get_proc_addr): New function.
(LOAD_DLL_FN): Use it.
(DEF_DLL_FN): Allow function attributes after argument
list. Add function pointer type used by LOAD_DLL_FN.
* src/w32.c (open_process_token, get_token_information)
(lookup_account_sid, get_sid_sub_authority)
(get_sid_sub_authority_count, get_security_info)
(get_file_security, set_file_security)
(set_named_security_info)
(get_security_descriptor_owner, get_security_descriptor_group)
(get_security_descriptor_dacl, is_valid_sid, equal_sid)
(get_length_sid, copy_sid, get_native_system_info)
(get_system_times, create_symbolic_link)
(is_valid_security_descriptor, convert_sd_to_sddl)
(convert_sddl_to_sd, get_adapters_info, reg_open_key_ex_w)
(reg_query_value_ex_w, expand_environment_strings_w)
(init_environment, create_toolhelp32_snapshot)
(process32_first, process32_next, open_thread_token)
(impersonate_self, revert_to_self, get_process_memory_info)
(get_process_working_set_size, global_memory_status)
(global_memory_status_ex, init_winsock)
(maybe_load_unicows_dll, globals_of_w32): Use get_proc_addr.
* src/w32fns.c (setup_w32_kbdhook, Ffile_system_info)
(get_dll_version, w32_reset_stack_overflow_guard)
(w32_backtrace, globals_of_w32fns): Use get_proc_addr.
* src/w32font.c (get_outline_metrics_w, get_text_metrics_w)
(get_glyph_outline_w, get_char_width_32_w): Use get_proc_addr.
* src/w32heap.c (init_heap): Use get_proc_addr.
* src/w32menu.c (globals_of_w32menu): Use get_proc_addr.
* src/w32proc.c (init_timers, sys_kill, w32_compare_strings):
Use get_proc_addr.
* src/w32uniscribe.c (syms_of_w32uniscribe): Use get_proc_addr.
Allen Li [Wed, 8 Aug 2018 07:03:36 +0000 (00:03 -0700)]
Don't include text properties when making autoloads
* lisp/emacs-lisp/autoload.el (autoload-generate-file-autoloads):
Ignore text properties when finding autoload defs. Otherwise,
autoload generation is less deterministic, as the exact format of the
generated autoloads depends on whether the files are visited in
Emacs. (Bug#32395)
Paul Eggert [Fri, 17 Aug 2018 07:25:20 +0000 (00:25 -0700)]
Fix problems with logxor etc. and fixnums
These operations incorrectly treated negative fixnums as
bignums greater than most-positive-fixnum.
* src/alloc.c (mpz_set_intmax_slow): Avoid undefined
behavior if signed unary negation overflows, while
we’re in the neighborhood.
(mpz_set_uintmax_slow): Remove. All uses removed.
* src/data.c (arith_driver): Treat fixnums as signed, not
unsigned, even for logical operations.
* src/lisp.h (mpz_set_uintmax): Remove. All uses removed.
* test/src/data-tests.el (data-tests-logand)
(data-tests-logior, data-tests-logxor): New tests.
Paul Eggert [Fri, 17 Aug 2018 03:44:19 +0000 (20:44 -0700)]
Reject outlandishly-wide bignums
Do not allow bignums that are so wide that their log base 2
might not fit into a fixnum, as this will cause problems elsewhere.
We already have a similar limitation for bool-vectors.
* src/emacs.c (check_bignum_size, xmalloc_for_gmp): New function.
(xrealloc_for_gmp): Check for too-large bignum.
(main): Use xmalloc_for_gmp.
Paul Eggert [Fri, 17 Aug 2018 02:53:21 +0000 (19:53 -0700)]
Speed up logcount on bignums
* src/data.c (Flogcount): Speed up by using the mpz equivalent
of ~X instead of -X-1.
Michael Albinus [Thu, 16 Aug 2018 15:26:37 +0000 (17:26 +0200)]
Fix Bug#32454
* lisp/files.el (find-alternate-file): Handle the wildcards case.
(Bug#32454)
Ken Brown [Thu, 16 Aug 2018 13:05:56 +0000 (09:05 -0400)]
Pacify GCC with -Wunused-but-set-variable
* src/unexcw.c (read_exe_header):
(fixup_executable):
(unexec): Specify the "unused" attribute for variables that
are used only in assertions.
Thomas Fitzsimmons [Wed, 15 Aug 2018 18:32:00 +0000 (14:32 -0400)]
EUDC: Add more BBDB >= 3 support
* lisp/net/eudcb-bbdb.el Declare BBDB >= 3 functions.
(eudc-bbdb-field): Add translation from company to
organization.
(eudc-bbdb-extract-phones, eudc-bbdb-extract-addresses)
(eudc-bbdb-format-record-as-result): Call BBDB >= 3 functions.
Thomas Fitzsimmons [Wed, 15 Aug 2018 17:16:25 +0000 (13:16 -0400)]
EUDC: Remove XEmacs support
* lisp/net/eudc.el (eudc-mode, eudc-install-menu): Remove
XEmacs support.
* lisp/net/eudc-hotlist.el (eudc-hotlist-mode)
(eudc-hotlist-emacs-menu): Likewise.
* lisp/net/eudc-bob.el (eudc-bob-toggle-inline-display)
(eudc-bob-popup-menu, eudc-bob-generic-keymap)
(eudc-bob-sound-keymap, eudc-bob-url-keymap)
(eudc-bob-mail-keymap): Likewise.
* etc/NEWS (EUDC): Mention removal of XEmacs support.
Thomas Fitzsimmons [Tue, 12 Jun 2018 19:28:43 +0000 (15:28 -0400)]
EUDC: Shorten eudc-tools-menu autoload
* lisp/net/eudc.el: Remove XEmacs support from eudc-tools-menu
autoload.
Thomas Fitzsimmons [Tue, 12 Jun 2018 18:50:48 +0000 (14:50 -0400)]
EUDC: Add commentary to eudc-bob.el
* lisp/net/eudc-bob.el: Add commentary.
Eli Zaretskii [Wed, 15 Aug 2018 02:37:45 +0000 (05:37 +0300)]
Improve documentation of last change
* lisp/hi-lock.el (hi-lock-set-pattern, hi-lock-face-buffer):
Improve the doc strings. (Bug#32365)
* etc/NEWS:
* doc/emacs/display.texi (Highlight Interactively): Clarify
wording.
Grégory Mounié [Fri, 3 Aug 2018 21:08:10 +0000 (23:08 +0200)]
Interactive Highlighting: prefix argument to select subexp
* doc/emacs/display.texi (Highlight Interactively):
* etc/NEWS: Document the change.
* lisp/hi-lock.el (hi-lock-face-buffer, hi-lock-set-pattern): Use
the prefix argument to highlight only the corresponding sub-expression
of the regexp (Bug#32365).
Copyright-paperwork-exempt: yes
Paul Eggert [Tue, 14 Aug 2018 23:06:05 +0000 (16:06 -0700)]
Rename --without-mini-gmp to --with-libgmp
* configure.ac (HAVE_GMP): Rename ‘configure’ option from
--without-mini-gmp to --with-libgmp. All uses changed.
* doc/lispref/numbers.texi (Predicates on Numbers): Large
integers are always available. Clarify how eq works on them.
Stephen Berman [Tue, 14 Aug 2018 22:14:41 +0000 (00:14 +0200)]
Fix last todo-edit-mode change
* lisp/calendar/todo-mode.el (todo-edit-mode): For editing an item
instead of the whole file, the current todo-file must be set from
todo-global-current-todo-file.
* test/lisp/calendar/todo-mode-tests.el (todo-test-current-file-in-edit-mode):
New test.
Stephen Berman [Tue, 14 Aug 2018 19:50:15 +0000 (21:50 +0200)]
; * lisp/calendar/todo-mode.el: Remove leftover commented out lines.
Stephen Berman [Tue, 14 Aug 2018 19:39:24 +0000 (21:39 +0200)]
Fix exiting from editing todo archive file (bug#32437)
* lisp/calendar/todo-mode.el (todo-edit-file): Make the warning
also suitable for Todo Archive mode, and add more space to it.
(todo-edit-quit): On quitting editing an archive file, return to
the Todo Archive mode buffer editing was invoked in.
(todo-check-format): Display a warning instead of a message when
the categories sexp isn't as expected.
(todo-mode-external-set): Remove.
(todo-edit-mode): Set buffer local values of
todo-current-todo-file and todo-categories from the todo or
archive file being edited.
(todo-categories-mode): Set buffer local values of
todo-current-todo-file and todo-categories as before but directly
instead of using superfluous todo-mode-external-set function.
* test/lisp/calendar/todo-mode-tests.el (todo-test-edit-quit): New test.
Paul Eggert [Tue, 14 Aug 2018 19:07:09 +0000 (12:07 -0700)]
Remove more traces of misc (Bug#32405)
Remove misc-objects-consed and the misc component of
memory-use-count, since misc objects no longer exist.
* doc/lispref/internals.texi, etc/NEWS: Mention this,
and adjust better to recent removal of misc objects.
* src/alloc.c (MEM_TYPE_MISC): Remove; no longer used.
(Fmemory_use_counts): Omit misc count, since miscs
no longer exist.
(misc-objects-consed): Remove.
Glenn Morris [Tue, 14 Aug 2018 16:06:43 +0000 (09:06 -0700)]
; Merge from origin/emacs-26
The following commit was skipped:
f882de8 (origin/emacs-26) Port better to x86 -fexcess-precision=fast
Glenn Morris [Tue, 14 Aug 2018 16:06:43 +0000 (09:06 -0700)]
Merge from origin/emacs-26
34e75c1 Add comment about floating point test
e73e683 Ibuffer: Add toggle ibuffer-do-toggle-lock
12f7116 Ibuffer: Detect correctly the buffers running a process
Glenn Morris [Tue, 14 Aug 2018 16:06:43 +0000 (09:06 -0700)]
; Merge from origin/emacs-26
The following commit was skipped:
1842297 Backport fix for Bug#32226
Glenn Morris [Tue, 14 Aug 2018 16:06:43 +0000 (09:06 -0700)]
Merge from origin/emacs-26
614cc65 ; * lisp/simple.el (line-move-visual): Fix typo.
d2ad4ba Do not consider external packages to be removable (Bug#27822)
ec0995c * src/alloc.c: Remove obsolete comments.
ec6f588 Better support utf-8-with-signature and utf-8-hfs in HTML
eb026a8 Don't use -Wabi compiler option
Paul Eggert [Tue, 14 Aug 2018 11:38:44 +0000 (04:38 -0700)]
Port recent changes to older GCC
Problem reported by Glenn Morris in:
https://lists.gnu.org/r/emacs-devel/2018-08/msg00446.html
* src/lisp.h (make_pointer_integer_unsafe):
Port to older GCC.
Paul Eggert [Mon, 13 Aug 2018 22:55:06 +0000 (15:55 -0700)]
Update doc strings for fixnum constants
* src/data.c (most-positive-fixnum, most-negative-fixnum):
Update doc strings in the light of fixnums.
Paul Eggert [Mon, 13 Aug 2018 22:45:17 +0000 (15:45 -0700)]
Fix check for unsafe watch descriptor
* src/lisp.h (make_pointer_integer_unsafe): New function.
(make_pointer_integer): Use it.
* src/gfilenotify.c (dir_monitor_callback): Omit redundant eassert.
(Fgfile_add_watch): Signal an error instead of failing an
assertion if the pointer does not work.
Paul Eggert [Sun, 12 Aug 2018 22:28:20 +0000 (15:28 -0700)]
Port better to x86 -fexcess-precision=fast
Problem reported by Eli Zaretskii in:
https://lists.gnu.org/r/emacs-devel/2018-08/msg00380.html
* src/data.c (arithcompare): Work around incompatibility
between gcc -fexcess-precision=fast and the C standard on x86,
by capturing the results of floating-point comparisons before
the excess precision spontaneously decays. Although this fix
might not work in general, it does work here and is probably
good enough for the platforms we care about.
(cherry picked from commit
a84cef90957f2379cc0df6bd908317fc441971ce)
Paul Eggert [Mon, 13 Aug 2018 16:36:11 +0000 (09:36 -0700)]
Add comment about floating point test
* test/src/data-tests.el (data-tests--float-greater-than-fixnums):
New constant.
(data-tests-=, data-tests-<, data-tests->, data-tests-<=)
(data-tests->=, data-tests-min): Use it.
Raimon Grau [Sun, 5 Aug 2018 21:47:30 +0000 (22:47 +0100)]
Add uuid as allowed thingatpt symbol (Bug#32372)
* etc/NEWS: Mention changes in thingatpt.el.
* lisp/thingatpt.el (thing-at-point-uuid-regexp): Add regexp for uuid.
(top-level): Add 'bounds-of-thing-at-point' operation for 'uuid'.
* test/lisp/thingatpt-tests.el: Add tests for uuid at point.
Tino Calancha [Mon, 13 Aug 2018 10:24:31 +0000 (19:24 +0900)]
Ibuffer: Add toggle ibuffer-do-toggle-lock
Toggle the locked status in marked buffers or the buffer
at point (Bug#32421).
* lisp/ibuffer.el (ibuffer-do-toggle-lock): New command.
(ibuffer-mode-map): Bind it to 'L'.
(ibuffer-mode-operate-map): Add entries for
`ibuffer-do-toggle-read-only' and `ibuffer-do-toggle-lock'.
* etc/NEWS (Changes in Specialized Modes and Packages in Emacs 26.2):
Announce the change.
Tino Calancha [Mon, 13 Aug 2018 10:22:49 +0000 (19:22 +0900)]
Ibuffer: Detect correctly the buffers running a process
* lisp/ibuffer.el (filename-and-process): Store the process buffer
as a text property; check for such property to detect a buffer
with a process (Bug#32420).
Paul Eggert [Mon, 13 Aug 2018 00:25:37 +0000 (17:25 -0700)]
Pacify gcc -Og -Wuninitialized
This addresses the -Og uninitialized variable warnings I ran
into on Fedora 28, which uses 8.1.1
20180712 (Red Hat 8.1.1-5).
It also changes some explicit initializations to UNINIT
when the variable does not actually need to be initialized.
* src/process.c (connect_network_socket):
* src/sysdep.c (system_process_attributes):
* src/xfns.c (x_real_pos_and_offsets):
* src/xterm.c (get_current_wm_state) [USE_XCB]:
Add UNINIT.
* src/editfns.c (tzlookup):
* src/fns.c (Fnconc):
* src/font.c (font_parse_fcname):
* src/frame.c (x_set_frame_parameters):
Prefer UNINIT to explicit initialization.
Paul Eggert [Mon, 13 Aug 2018 00:14:43 +0000 (17:14 -0700)]
* configure.ac (GMP_LIB): Set to -lgmp if --without-mini-gmp.
Paul Eggert [Sun, 12 Aug 2018 22:28:20 +0000 (15:28 -0700)]
Port better to x86 -fexcess-precision=fast
Problem reported by Eli Zaretskii in:
https://lists.gnu.org/r/emacs-devel/2018-08/msg00380.html
* src/data.c (arithcompare): Work around incompatibility
between gcc -fexcess-precision=fast and the C standard on x86,
by capturing the results of floating-point comparisons before
the excess precision spontaneously decays. Although this fix
might not work in general, it does work here and is probably
good enough for the platforms we care about.
Stephen Berman [Sun, 12 Aug 2018 21:25:53 +0000 (23:25 +0200)]
Update and improve todo-mode item insertion and editing code
* lisp/calendar/todo-mode.el (todo-insert-item--param-key-alist)
(todo-insert-item--keyof, todo-insert-item--this-key)
(todo-insert-item--keys-so-far, todo-insert-item--args)
(todo-insert-item--argleft. todo-insert-item--argsleft)
(todo-insert-item--newargsleft, todo-insert-item--apply-args)
(todo-edit-item--param-key-alist, todo-edit-item--prompt)
(todo-edit-item--date-param-key-alist)
(todo-edit-done-item--param-key-alist): Remove.
(todo-insert-item--next-param): Reimplement to take advantage of
lexical binding.
(todo-insert-item): Adjust to new implementation of the above.
(todo-edit-item--next-key): Incorporate now removed global
variables, adjust signature accordingly, update use of pcase.
(todo-edit-item): Adjust to changed signature of the above.
Paul Eggert [Sun, 12 Aug 2018 18:46:07 +0000 (11:46 -0700)]
Adjust .gdbinit to removal of misc objects
* src/.gdbinit (xtype, xpr): Adjust.
(xmisctype, xmiscfree): Remove.
Paul Eggert [Sun, 12 Aug 2018 18:10:11 +0000 (11:10 -0700)]
Make mini-gmp safe for --enable-gcc-warnings
* configure.ac (GMP_OBJ): When building mini-gmp, compile
mini-gmp-emacs.c, not mini-gmp.c.
* lib-src/etags.c (NDEBUG): Don't attempt to redefine, in
case the builder compiles with -DNDEBUG.
* src/conf_post.h (NDEBUG) [!ENABLE_CHECKING && !NDEBUG]: Define.
This avoids bloat in mini-gmp-emacs.o.
* src/mini-gmp-emacs.c: New file, which pacifies --enable-gcc-warnings.
Michael Albinus [Sun, 12 Aug 2018 16:15:24 +0000 (18:15 +0200)]
Backport fix for Bug#32226
* test/lisp/shadowfile-tests.el: Set Tramp variables for hydra.
(shadow-test06-literal-groups, shadow-test07-regexp-groups)
(shadow-test08-shadow-todo, shadow-test09-shadow-copy-files):
Use `set-visited-file-name' instead of setting the value in
`buffer-file-name' directly.
(shadow-test08-shadow-todo, shadow-test09-shadow-copy-files):
Test for writable temporary directory. Suppress errors in
cleanup. (Bug#32226)
Eli Zaretskii [Sun, 12 Aug 2018 16:03:27 +0000 (19:03 +0300)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Sun, 12 Aug 2018 16:02:32 +0000 (19:02 +0300)]
; Avoid compilation warnings under -Og
* src/w32.c (w32_read_registry):
* src/font.c (font_parse_fcname):
* src/fns.c (Fnconc):
* src/editfns.c (tzlookup):
* src/frame.c (x_set_frame_parameters): Avoid compiler warnings
about maybe-uninitialized variables.
Paul Eggert [Sun, 12 Aug 2018 16:01:00 +0000 (09:01 -0700)]
Fix typo caught by zsh
* lisp/Makefile.in (compile-clean): Fix typo; missing ";" (Bug#32423).
Michael Albinus [Sun, 12 Aug 2018 15:38:24 +0000 (17:38 +0200)]
; Remove instrumentation for Bug#32226
João Távora [Sun, 12 Aug 2018 12:26:06 +0000 (13:26 +0100)]
jsonrpc-shutdown's cleanup also kills stderr buffer
* lisp/jsonrpc.el
(Version): Bump to 1.0.6
(jsonrpc-shutdown): Also kill stderr buffer
João Távora [Sun, 12 Aug 2018 12:22:27 +0000 (13:22 +0100)]
Revert "Make jsonrpc-shutdown a noop if process isn't running"
This reverts commit
c580443325a3d071625185876a8f28e04793c625. It
leads to situations where the sentinel hasn't run yet, which brings
problems if the normal process isn't running, but the stderr
pseudo-process still is.
* lisp/jsonrpc.el (jsonrpc-shutdown): Always enter loop.
Charles A. Roelli [Sun, 12 Aug 2018 11:05:27 +0000 (13:05 +0200)]
; * lisp/simple.el (line-move-visual): Fix typo.
Andreas Schwab [Sun, 12 Aug 2018 10:05:46 +0000 (12:05 +0200)]
Ensure no padding after union vectorlike_header
Instead of increasing GCALIGNMENT align union vectorlike_header by
adding a Lisp_Object member.
* src/lisp.h (GCALIGNMENT): Revert last change.
(union vectorlike_header): Add align member.
(header_size): Verify the same as sizeof (union
vectorlike_header)
Andreas Schwab [Sun, 12 Aug 2018 09:03:36 +0000 (11:03 +0200)]
Avoid padding after union vectorlike_header
The PSEUDOVECTORSIZE macro requires that the first member after union
vectorlike_header has the same offset in all pseudo vector structures.
* src/lisp.h (GCALIGNMENT) [!USE_LSB_TAG]: Use alignment of
Lisp_Object.
Paul Eggert [Sun, 12 Aug 2018 08:06:15 +0000 (01:06 -0700)]
New 'configure' arg --with-mini-gmp
* configure.ac: It lets the builder override default of whther
mini-gmp is used. Use AC_SEARCH_LIBS as per Autoconf manual.
Paul Eggert [Sun, 12 Aug 2018 02:07:43 +0000 (19:07 -0700)]
Update from Gnulib
This incorporates:
2018-08-11 verify: port 'assume' to traditional tools
* build-aux/config.sub, lib/regcomp.c, lib/verify.h:
Copy from Gnulib.
* lib/gnulib.mk.in: Regenerate.
Paul Eggert [Thu, 9 Aug 2018 18:13:17 +0000 (11:13 -0700)]
Remove stray union Lisp_Misc doc (Bug#32405#35).
Paul Eggert [Thu, 9 Aug 2018 07:35:47 +0000 (00:35 -0700)]
Simplify mark_object for pseudovectors
Suggested by Pip Cet (Bug#32405#14).
* src/alloc.c (mark_object): Remove unnecessary special cases for
PVEC_MARKER, PVEC_BOOL_VECTOR, PVEC_MISC_PTR, PVEC_USER_PTR, and
PVEC_FINALIZER.
change is to free up an enum Lisp_Type tag value, a scarce
Paul Eggert [Thu, 9 Aug 2018 02:46:29 +0000 (19:46 -0700)]
Turn misc objects into pseudovectors
Eliminate the category of miscellaneous objects, and turn all
such objects into pseudovectors. The immediate motivation
for this change is to free up an enum Lisp_Type tag value, a
scarce resource that can be better used elsewhere. However,
this change is worthwhile in its own right, as it improves
performance slightly on my platform, 0.3% faster for 'make
compile-always' on Fedora 28, and it simplifies the garbage
collector and interpreter (Bug#32405).
* doc/lispref/internals.texi (Garbage Collection):
* etc/NEWS:
Document change to garbage-collect return value.
* src/alloc.c (total_markers, total_free_markers):
(union aligned_Lisp_Misc, MARKER_BLOCK_SIZE)
(struct marker_block, marker_block, marker_block_index)
(misc_free_list, allocate_misc, live_misc_holding)
(live_misc_p, sweep_misc):
* src/lisp.h (lisp_h_MARKERP, lisp_h_MISCP, MARKERP, MISCP)
(Lisp_Misc, enum Lisp_Misc_Type, Lisp_Misc_Free)
(Lisp_Misc_Marker, Lisp_Misc_Overlay, Lisp_Misc_Finalizer)
(Lisp_Misc_Ptr, Lisp_Misc_User_Ptr, Lisp_Misc_Limit)
(Lisp_Misc_Bignum)
(XSETMISC, struct Lisp_Misc_Any, XMISCANY, XMISCTYPE)
(struct Lisp_Free, union Lisp_Misc, XMISC):
Remove. All uses removed.
(cleanup_vector): Clean up objects that were formerly misc
and are now pseudovectors.
(make_misc_ptr, build_overlay, Fmake_marker, build_marker)
(make_bignum_str, make_number, make_pure_bignum)
(make_user_ptr, Fmake_finalizer):
Build as pseudovectors, not as misc objects.
(mark_finalizer_list, queue_doomed_finalizers)
(compact_undo_list, mark_overlay, mark_object)
(unchain_dead_markers):
Mark as vector-like objects, not as misc objects.
(mark_maybe_object, mark_maybe_pointer, valid_lisp_object_p)
(total_bytes_of_live_objects, survives_gc_p):
* src/fns.c (sxhash):
No need to worry about misc objects.
(garbage_collect_1): Do not generate a 'misc' component.
(syms_of_alloc): No need for 'misc' symbol.
* src/buffer.c (overlays_at, overlays_in, overlay_touches_p)
(overlay_strings, recenter_overlay_lists)
(fix_start_end_in_overlays, fix_overlays_before)
(Foverlay_lists, report_overlay_modification)
(evaporate_overlays):
* src/editfns.c (overlays_around):
* src/data.c (Ftype_of):
* src/fns.c (internal_equal):
* src/lisp.h (mint_ptrp, xmint_pointer, FINALIZERP)
(XFINALIZER, MARKERP, XMARKER, OVERLAYP, XOVERLAY, USER_PTRP)
(XUSER_PTR, BIGNUMP, XBIGNUM):
* src/print.c (print_vectorlike, print_object):
* src/undo.c (record_marker_adjustments):
* src/xdisp.c (load_overlay_strings):
Formerly misc objects are now pseudovectors.
* src/lisp.h (PVEC_MARKER, PVEC_OVERLAY, PVEC_FINALIZER)
(PVEC_BIGNUM, PVEC_MISC_PTR, PVEC_USER_PTR):
New constants, replacing their misc versions. All uses changed.
(struct Lisp_Marker, struct Lisp_Overlay, struct Lisp_Misc_Ptr)
(struct Lisp_Bignum, struct Lisp_User_Ptr, struct Lisp_Finalizer):
Make usable as a pseudovector by using a pseudovector header,
replacing any DIY components, and putting Lisp_Object members
first. All uses changed.
Yuri D'Elia [Tue, 17 Jul 2018 10:59:35 +0000 (12:59 +0200)]
Do not consider external packages to be removable (Bug#27822)
Packages which are not directly user-installed shouldn't be autoremoved,
since they can be setup through a different path (via
`package-directory-list') where we have no authority over.
* lisp/emacs-lisp/package.el (package--user-installed-p): New
function.
(package--removable-packages): Use it.
Paul Eggert [Sat, 11 Aug 2018 23:32:06 +0000 (16:32 -0700)]
Pacify Oracle Studio 12.6
* src/xfns.c (Fx_frame_restack):
* src/xterm.c (x_io_error_quitter): Omit unreachable code.
Paul Eggert [Sat, 11 Aug 2018 23:27:52 +0000 (16:27 -0700)]
Reject old libgmp that lack mpz_roinit_n
* configure.ac (HAVE_GMP): Port to RHEL 6.9, which has
libgmp 3.5, which predates mpz_roinit_n.
Glenn Morris [Sat, 11 Aug 2018 21:44:49 +0000 (14:44 -0700)]
; * test/lisp/international/ccl-tests.el: Add license notice.
Tom Tromey [Sat, 11 Aug 2018 19:34:17 +0000 (13:34 -0600)]
Merge branch 'feature/bignum'
Paul Eggert [Sat, 11 Aug 2018 19:13:53 +0000 (12:13 -0700)]
* src/alloc.c: Remove obsolete comments.
Michael Albinus [Sat, 11 Aug 2018 18:30:39 +0000 (20:30 +0200)]
Fix Bug#32226, hopefully
* test/lisp/shadowfile-tests.el: Set Tramp variables for hydra.
João Távora [Sat, 11 Aug 2018 16:08:13 +0000 (17:08 +0100)]
Fix blunder in last commit for lisp/jsonrpc.el
* lisp/jsonrpc.el (jsonrpc-shutdown): Use jsonrpc--process.
João Távora [Sat, 11 Aug 2018 15:53:26 +0000 (16:53 +0100)]
Add option to cleanup buffers to jsonrpc-shutdown
* lisp/jsonrpc.el (Version): Bump to 1.0.5
(jsonrpc-shutdown): Add an option to cleanup process buffer.
Michael Albinus [Sat, 11 Aug 2018 15:02:38 +0000 (17:02 +0200)]
; More instrumentation for shadowfile-tests.el and files.el
João Távora [Sat, 11 Aug 2018 13:19:10 +0000 (14:19 +0100)]
* lisp/jsonrpc.el (jsonrpc-request): Clarify comment.
João Távora [Sat, 11 Aug 2018 13:18:17 +0000 (14:18 +0100)]
Make jsonrpc-shutdown a noop if process isn't running
* lisp/jsonrpc.el
(Version): Bump to 1.0.4
(jsonrpc-shutdown): Noop if server isn't running.
Andy Moreton [Fri, 20 Jul 2018 16:45:09 +0000 (17:45 +0100)]
Avoid calling vc backend if 'vc-display-status' is nil
* lisp/vc/vc-hooks.el (vc-mode-line): Avoid calling VC backend if
'vc-display-status' is nil. (Bug#32225)
Eli Zaretskii [Sat, 11 Aug 2018 09:55:52 +0000 (12:55 +0300)]
Give auto-save-no-message a proper version attribute
* lisp/cus-start.el (standard): Give 'auto-save-no-message' the
proper version attribute. (Bug#31039)
Federico Tedin [Mon, 6 Aug 2018 22:53:05 +0000 (19:53 -0300)]
Add variable auto-save-no-message
* src/keyboard.c (auto-save-no-message): New variable, allows
suppressing auto-saving message.
* lisp/cus-start.el (standard): Add 'auto-save-no-message' variable.
* doc/emacs/files.texi (Auto Save): Document 'auto-save-no-message'.
* etc/NEWS: Mention 'auto-save-no-message'. (Bug#31039)
Eli Zaretskii [Sat, 11 Aug 2018 09:01:37 +0000 (12:01 +0300)]
Better support utf-8-with-signature and utf-8-hfs in HTML
* lisp/international/mule.el (sgml-html-meta-auto-coding-function):
Support UTF-8 with BOM and utf-8-hfs as variants of UTF-8, and
obey the buffer's encoding if it is one of these variants, instead
of re-encoding in UTF-8 proper. (Bug#20623)
Eli Zaretskii [Sat, 11 Aug 2018 08:38:43 +0000 (11:38 +0300)]
Don't use -Wabi compiler option
* configure.ac: Add -Wabi to the list of disabled warning
options. For the details, see
http://lists.gnu.org/archive/html/emacs-devel/2018-08/msg00123.html.
Michael Albinus [Sat, 11 Aug 2018 08:26:20 +0000 (10:26 +0200)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Michael Albinus [Sat, 11 Aug 2018 08:25:55 +0000 (10:25 +0200)]
; More instrumentation for files.el
Eli Zaretskii [Sat, 11 Aug 2018 08:19:27 +0000 (11:19 +0300)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Sat, 11 Aug 2018 08:15:57 +0000 (11:15 +0300)]
Reinstate the 'tis620-2533' character set
This is a partial revert of "Make 'tis620-2533' character set be an
alias for 'thai-iso8859-11'" commit from Jul 28, 2018.
* lisp/international/mule-conf.el (tis620-2533): No longer an
alias for thai-iso8859-11. Instead, reinstate the original
definition of tis620-2533, but without eight-bit-control in
the :superset attribute. For the details, see
http://lists.gnu.org/archive/html/emacs-devel/2018-08/msg00117.html
and the surrounding discussions.
* lisp/international/fontset.el (font-encoding-alist)
(font-encoding-charset-alist): Reinstate tis620-2533 charset.
* lisp/language/thai.el (thai-tis620): Restore the original
:charset-list.
("Thai"): Restore the original nonascii-translation.
* lisp/w32-fns.el: Use tis620-2533 instead of thai-iso8859-11.
Michael Albinus [Sat, 11 Aug 2018 07:51:27 +0000 (09:51 +0200)]
Editorial changes in tramp.texi
* doc/misc/tramp.texi (Bug Reports): Tramp buffers shall be
appended as attachments to bug reports.
(Frequently Asked Questions): New item, determining remote buffers.
Nikolaus Rath [Mon, 23 Jul 2018 09:21:46 +0000 (10:21 +0100)]
Make nnimap support IMAP namespaces
* lisp/gnus/nnimap.el (nnimap-use-namespaces): Introduce new
server variable.
(nnimap-group-to-imap, nnimap-get-groups): Transform IMAP group
names to Gnus group name by stripping / prefixing personal
namespace prefix.
(nnimap-open-connection-1): Ask server for namespaces and store
them.
* lisp/gnus/nnimap.el (nnimap-request-group-scan)
(nnimap-request-create-group, nnimap-request-delete-group)
(nnimap-request-rename-group, nnimap-request-move-article)
(nnimap-process-expiry-targets)
(nnimap-request-update-group-status)
(nnimap-request-accept-article, nnimap-request-list)
(nnimap-retrieve-group-data-early, nnimap-change-group)
(nnimap-split-incoming-mail): Use nnimap-group-to-imap.
(nnimap-group-to-imap): New function to map Gnus group names to
IMAP folder names. (Bug#21057)
Eli Zaretskii [Sat, 11 Aug 2018 07:34:10 +0000 (10:34 +0300)]
Improve error message when Hunspell dictionaries are misconfigured
* lisp/textmodes/ispell.el
(ispell-find-hunspell-dictionaries): Produce a meaningful
error message if Hunspell dictionaries are misconfigured.
(Bug#32319)
Glenn Morris [Fri, 10 Aug 2018 18:37:11 +0000 (11:37 -0700)]
; Merge from origin/emacs-26
The following commit was skipped:
5e42c34 (origin/emacs-26) Fix bugs in `auth-source-netrc-parse-one'.
Glenn Morris [Fri, 10 Aug 2018 18:37:11 +0000 (11:37 -0700)]
Merge from origin/emacs-26
71c92d8 Fix copying text properties by 'format'
96be6b6 Improve error messages regarding initial-buffer-choice (Bug#2...
00fb127 * test/lisp/wdired-tests.el (wdired-test-unfinished-edit-01):...
Conflicts:
lisp/startup.el
Glenn Morris [Fri, 10 Aug 2018 18:28:40 +0000 (11:28 -0700)]
; Merge from origin/emacs-26
The following commit was skipped:
18588bc Make async :family 'local failures fail correctly again
Glenn Morris [Fri, 10 Aug 2018 18:28:40 +0000 (11:28 -0700)]
Merge from origin/emacs-26
5afbf62 Fix emacsclient check for term.el buffer (Bug#21041)
5132a58 Improve documentation of 'set-fontset-font'
cd90325 Improve documentation of M-?
155a885 Reinterpret Esperanto characters in iso-transl as iso-8859-3.
a0ef733 Fix Flyspell mode when several languages are mixed in a buffer
Filipp Gunbin [Tue, 15 May 2018 00:02:49 +0000 (03:02 +0300)]
Fix bugs in `auth-source-netrc-parse-one'.
* lisp/auth-source.el (auth-source-netrc-parse-one): Ensure that match
data is not overwritten in `auth-source-netrc-parse-next-interesting'.
Ensure that blanks are skipped before and after going over comments
and eols.
* test/lisp/auth-source-tests.el (auth-source-test-netrc-parse-one): New test.
(cherry picked from commit
60ff8101449eea3a5ca4961299501efd83d011bd)
Michael Albinus [Fri, 10 Aug 2018 11:34:10 +0000 (13:34 +0200)]
; More instrumentation for shadowfile-tests.el and files.el
* test/lisp/shadowfile-tests.el (shadow-test06-literal-groups)
(shadow-test07-regexp-groups, shadow-test08-shadow-todo)
(shadow-test09-shadow-copy-files): Use `set-visited-file-name'
instead of setting the value in `buffer-file-name' directly.
(Bug#32226)
Michael Albinus [Fri, 10 Aug 2018 08:58:00 +0000 (10:58 +0200)]
Another try to fix Bug#32226
* test/lisp/shadowfile-tests.el (shadow-test06-literal-groups)
(shadow-test07-regexp-groups, shadow-test08-shadow-todo)
(shadow-test09-shadow-copy-files): Use `set-visited-file-name'
instead of setting the value in `buffer-file-name' directly.
(Bug#32226)
Michael Albinus [Fri, 10 Aug 2018 07:53:37 +0000 (09:53 +0200)]
; More instrumentation for files.el
João Távora [Fri, 10 Aug 2018 00:15:25 +0000 (01:15 +0100)]
Allow completely disabling event logging in jsonrpc.el
Pretty printing the event sexp can be very slow when very big messages
are involved.
* lisp/jsonrpc.el (Version): Bump to 1.0.3
(jsonrpc-connection): Tweak docstring for
jsonrpc--event-buffer-scrollback-size.
(jsonrpc--log-event): Only log if max size is positive.
Tom Tromey [Fri, 10 Aug 2018 00:02:00 +0000 (18:02 -0600)]
Fix up for bignums after merge from trunk
* src/character.c (char_width): Use XFIXNUM.
* src/editfns.c (styled_format): Use XFIXNUM, XUFIXNUM.
* src/fns.c (Fproper_list_p): Use make_fixnum.
Tom Tromey [Thu, 9 Aug 2018 23:56:53 +0000 (17:56 -0600)]
Merge remote-tracking branch 'origin/master' into feature/bignum
Tom Tromey [Thu, 9 Aug 2018 19:21:45 +0000 (13:21 -0600)]
Use mpz_sgn rather than comparisons against 0
* src/data.c (Fmod): Use mpz_sgn.
* src/lisp.h (NATNUMP): Use mpz_sgn.
Andy Moreton [Thu, 9 Aug 2018 19:19:15 +0000 (13:19 -0600)]
Do not use GMP_NUMB_BITS
* src/alloc.c (make_number): Use mp_bits_per_limb, not GMP_NUMB_BITS.